{extend name="public/base" /} {block name="body"}
<div class="ibox float-e-margins">
	<div class="ibox-title">
		<h5>友情链接列表</h5>
	</div>
	<div class="ibox-content">
		<div class="row">
			<div class="col-sm-12">
				<div class="col-sm-2">
					<div class="input-group">
						<a href="{:url('add')}" class="btn btn-primary btn-outline">添加链接</a>
					</div>
				</div>
			</div>
		</div>
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                                <th width="3%">ID</th>
                                <th width="10%">图片</th>
                                <th width="25%">标题</th>
                                <th width="25%">跳转url</th>
								 <th width="10%">排序</th>
                                <th width="15%">操作</th>
                            </tr>
                        </thead>
                        <tbody id="list">
                        	{volist name="list" id='ad'}
                        	<tr>
                        		<td>{$ad.id}</td>
                        		<td><img src="{$ad.thumb}"  width="50px"/></td>
                        		<td>{$ad.title}</td>
                        		<td>{$ad.url}</td>
                        		<td>{$ad.sort}</td>
                        		<td>	
                        			<a href="{:url('edit',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp; {if condition="$vo.id neq 1"}
									<a href="{:url('delete',['id'=>$ad.id])}" class="btn btn-danger bnt-sm ajax-delete">
										<i class="fa fa-trash-o"></i> 删除</a>
									{/if}
                        		</td>
                        	</tr>
                        	{/volist}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                      {$list->render()}
                    </div>
                </div>
            </div>
            </div>
</div>
{/block} {block name="script"}
<script>
</script>
{/block}